#include <bits/stdc++.h>
using namespace std;
int cnt[100007]{0};
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    vector<int> r(n);
    vector<bool> d(n,false);
    for(int i=0;i<n;i++){
        int a;
        cin>>a;
        cnt[a]+=1;
    }
    int ind=0;
    for(int i=0;i<100007;i++){
        for(int j=0;j<cnt[i];j++){
            r[ind++]=i;
        }
    }
    int f=0,s=1,res=n;
    while(s<n){
        while(s<n && r[s]<=r[f])
        {
            s++;
        }
        if(s<n){
            res-=1;
            f+=1;
            s+=1;
        }
    }
    cout<<res;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
